3.338 \(\int \sqrt{d \tan (e+f x)} (a+a \tan (e+f x)) \, dx\)

Optimal. Leaf size=72 \[ \frac{2 a \sqrt{d \tan (e+f x)}}{f}-\frac{\sqrt{2} a \sqrt{d} \tanh ^{-1}\left (\frac{\sqrt{d} \tan (e+f x)+\sqrt{d}}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{f} \]

[Out]

-((Sqrt[2]*a*Sqrt[d]*ArcTanh[(Sqrt[d] + Sqrt[d]*Tan[e + f*x])/(Sqrt[2]*Sqrt[d*Tan[e + f*x]])])/f) + (2*a*Sqrt[
d*Tan[e + f*x]])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0730247, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3528, 3532, 208} \[ \frac{2 a \sqrt{d \tan (e+f x)}}{f}-\frac{\sqrt{2} a \sqrt{d} \tanh ^{-1}\left (\frac{\sqrt{d} \tan (e+f x)+\sqrt{d}}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[d*Tan[e + f*x]]*(a + a*Tan[e + f*x]),x]

[Out]

-((Sqrt[2]*a*Sqrt[d]*ArcTanh[(Sqrt[d] + Sqrt[d]*Tan[e + f*x])/(Sqrt[2]*Sqrt[d*Tan[e + f*x]])])/f) + (2*a*Sqrt[
d*Tan[e + f*x]])/f

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3532

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*d^2)/f,
Subst[Int[1/(2*c*d + b*x^2), x], x, (c - d*Tan[e + f*x])/Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x
] && EqQ[c^2 - d^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \sqrt{d \tan (e+f x)} (a+a \tan (e+f x)) \, dx &=\frac{2 a \sqrt{d \tan (e+f x)}}{f}+\int \frac{-a d+a d \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx\\ &=\frac{2 a \sqrt{d \tan (e+f x)}}{f}-\frac{\left (2 a^2 d^2\right ) \operatorname{Subst}\left (\int \frac{1}{-2 a^2 d^2+d x^2} \, dx,x,\frac{-a d-a d \tan (e+f x)}{\sqrt{d \tan (e+f x)}}\right )}{f}\\ &=-\frac{\sqrt{2} a \sqrt{d} \tanh ^{-1}\left (\frac{\sqrt{d}+\sqrt{d} \tan (e+f x)}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{f}+\frac{2 a \sqrt{d \tan (e+f x)}}{f}\\ \end{align*}

Mathematica [C]  time = 0.10091, size = 92, normalized size = 1.28 \[ \frac{(1+i) a \sqrt{d \tan (e+f x)} \left (\sqrt [4]{-1} \tan ^{-1}\left ((-1)^{3/4} \sqrt{\tan (e+f x)}\right )+(1-i) \sqrt{\tan (e+f x)}-(-1)^{3/4} \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\tan (e+f x)}\right )\right )}{f \sqrt{\tan (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[d*Tan[e + f*x]]*(a + a*Tan[e + f*x]),x]

[Out]

((1 + I)*a*((-1)^(1/4)*ArcTan[(-1)^(3/4)*Sqrt[Tan[e + f*x]]] - (-1)^(3/4)*ArcTanh[(-1)^(3/4)*Sqrt[Tan[e + f*x]
]] + (1 - I)*Sqrt[Tan[e + f*x]])*Sqrt[d*Tan[e + f*x]])/(f*Sqrt[Tan[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.018, size = 337, normalized size = 4.7 \begin{align*} 2\,{\frac{a\sqrt{d\tan \left ( fx+e \right ) }}{f}}-{\frac{a\sqrt{2}}{4\,f}\sqrt [4]{{d}^{2}}\ln \left ({ \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ) }-{\frac{a\sqrt{2}}{2\,f}\sqrt [4]{{d}^{2}}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }+{\frac{a\sqrt{2}}{2\,f}\sqrt [4]{{d}^{2}}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }+{\frac{ad\sqrt{2}}{4\,f}\ln \left ({ \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}+{\frac{ad\sqrt{2}}{2\,f}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}-{\frac{ad\sqrt{2}}{2\,f}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*tan(f*x+e))^(1/2)*(a+a*tan(f*x+e)),x)

[Out]

2*a*(d*tan(f*x+e))^(1/2)/f-1/4/f*a*(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/
2)+(d^2)^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))-1/2/f*a*(d^2)^(1/4)*2^(1/
2)*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)+1/2/f*a*(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/4)*
(d*tan(f*x+e))^(1/2)+1)+1/4/f*a*d/(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2
)+(d^2)^(1/2))/(d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+1/2/f*a*d/(d^2)^(1/4)*2^(1
/2)*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-1/2/f*a*d/(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/
4)*(d*tan(f*x+e))^(1/2)+1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)*(a+a*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.69901, size = 436, normalized size = 6.06 \begin{align*} \left [\frac{\sqrt{2} a \sqrt{d} \log \left (\frac{d \tan \left (f x + e\right )^{2} - 2 \, \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{d}{\left (\tan \left (f x + e\right ) + 1\right )} + 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, \sqrt{d \tan \left (f x + e\right )} a}{2 \, f}, \frac{\sqrt{2} a \sqrt{-d} \arctan \left (\frac{\sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{-d}{\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, d \tan \left (f x + e\right )}\right ) + 2 \, \sqrt{d \tan \left (f x + e\right )} a}{f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)*(a+a*tan(f*x+e)),x, algorithm="fricas")

[Out]

[1/2*(sqrt(2)*a*sqrt(d)*log((d*tan(f*x + e)^2 - 2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d)*(tan(f*x + e) + 1) + 4*
d*tan(f*x + e) + d)/(tan(f*x + e)^2 + 1)) + 4*sqrt(d*tan(f*x + e))*a)/f, (sqrt(2)*a*sqrt(-d)*arctan(1/2*sqrt(2
)*sqrt(d*tan(f*x + e))*sqrt(-d)*(tan(f*x + e) + 1)/(d*tan(f*x + e))) + 2*sqrt(d*tan(f*x + e))*a)/f]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \sqrt{d \tan{\left (e + f x \right )}}\, dx + \int \sqrt{d \tan{\left (e + f x \right )}} \tan{\left (e + f x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))**(1/2)*(a+a*tan(f*x+e)),x)

[Out]

a*(Integral(sqrt(d*tan(e + f*x)), x) + Integral(sqrt(d*tan(e + f*x))*tan(e + f*x), x))

________________________________________________________________________________________

Giac [B]  time = 1.30784, size = 336, normalized size = 4.67 \begin{align*} \frac{2 \, \sqrt{d \tan \left (f x + e\right )} a}{f} - \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} - a{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} + 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{2 \, d f} - \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} - a{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (-\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} - 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{2 \, d f} - \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} + a{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{4 \, d f} + \frac{\sqrt{2}{\left (a d \sqrt{{\left | d \right |}} + a{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{4 \, d f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)*(a+a*tan(f*x+e)),x, algorithm="giac")

[Out]

2*sqrt(d*tan(f*x + e))*a/f - 1/2*sqrt(2)*(a*d*sqrt(abs(d)) - a*abs(d)^(3/2))*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(
abs(d)) + 2*sqrt(d*tan(f*x + e)))/sqrt(abs(d)))/(d*f) - 1/2*sqrt(2)*(a*d*sqrt(abs(d)) - a*abs(d)^(3/2))*arctan
(-1/2*sqrt(2)*(sqrt(2)*sqrt(abs(d)) - 2*sqrt(d*tan(f*x + e)))/sqrt(abs(d)))/(d*f) - 1/4*sqrt(2)*(a*d*sqrt(abs(
d)) + a*abs(d)^(3/2))*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(d))/(d*f) + 1/4*sqr
t(2)*(a*d*sqrt(abs(d)) + a*abs(d)^(3/2))*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(
d))/(d*f)